<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AlterUserTables extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::table('user',function (Blueprint $table){
			$table->smallInteger('audit')->nullable()->default(0);//审核状态
		});
		
		Schema::table('customer',function(Blueprint $table){
			$table->dropColumn('id');
			$table->primary('user_id');
		});
		Schema::table('lawyer',function(Blueprint $table){
			$table->dropColumn('id');
			$table->primary('user_id');
		});
		Schema::table('company',function(Blueprint $table){
			$table->dropColumn('id');
			$table->primary('user_id');
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		//
	}

}
